#ifndef HADRONICWRECONSTRUCTOR
#define HADRONICWRECONSTRUCTOR

#include "base/particle.h"
#include "base/EvtData.h"

const float MW=80.0;
struct WCandidate{
  particle j1;
  particle j2;
  double deltaM;
  int i1;//jet indice 1
  int i2;//jet indice 2
  particle theW;
};
class HadronicWReconstructor{
  
public:
  HadronicWReconstructor();
  HadronicWReconstructor(EvtData*,int i=0);
  ~HadronicWReconstructor();
  WCandidate getW();
  void Run();
  static bool MinimizebyDeltam(WCandidate,WCandidate);//a minimizer function for sort algorithm
  static bool MaximizebyPt(WCandidate,WCandidate);
  unsigned int getNWcand();
private:
EvtData* evtdata;  
std::vector<WCandidate>* WContainer;  
std::vector<WCandidate> singleJetWContainer;
WCandidate W;
unsigned int NWcand;  
int scheme;
};

#endif